Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: improve preparePushMessage #1509

Merged
merged 8 commits into from
Aug 30, 2023
Merged

chore: improve preparePushMessage #1509

merged 8 commits into from
Aug 30, 2023

Conversation

weboko
Copy link
Collaborator

@weboko weboko commented Aug 28, 2023

Tiny follow-up to #1487

@weboko weboko requested a review from a team as a code owner August 28, 2023 10:57
@@ -27,6 +27,16 @@ const log = debug("waku:light-push");
export const LightPushCodec = "/vac/waku/lightpush/2.0.0-beta1";
export { PushResponse };

type PreparePushMessageResult =
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can move this to @waku/interfaces

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can move this to @waku/interfaces

Hum, not sure I agree. preparepush is not really part of the push protocol and it's an internal type.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imo all interfaces/types should exist in @waku/interfaces

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's meant to store common interfaces, not all types.

Copy link
Collaborator

@danisharora099 danisharora099 Aug 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'd suggest to have an internal types folder in the monorepo.. helps maintain readability and structure

Copy link
Collaborator Author

@weboko weboko Aug 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am against moving all types to @waku/interfaces and I think it is better to dedicate it for shared between packages/public types.

PreparePushMessageResult I would perceive as a private local variable so it makes sense to keep only within the file.

@github-actions
Copy link

github-actions bot commented Aug 29, 2023

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
Waku core 28.67 KB (0%) 574 ms (0%) 2.2 s (+29.88% 🔺) 2.7 s
Waku Simple Light Node 298.01 KB (-0.01% 🔽) 6 s (-0.01% 🔽) 5.1 s (-16.01% 🔽) 11 s
ECIES encryption 28.68 KB (0%) 574 ms (0%) 1.9 s (+14.38% 🔺) 2.5 s
Symmetric encryption 28.69 KB (0%) 574 ms (0%) 1.9 s (+22.58% 🔺) 2.5 s
DNS discovery 118.6 KB (0%) 2.4 s (0%) 3 s (-8.63% 🔽) 5.4 s
Privacy preserving protocols 122.15 KB (0%) 2.5 s (0%) 3.1 s (-9.78% 🔽) 5.6 s
Light protocols 28.4 KB (-0.02% 🔽) 568 ms (-0.02% 🔽) 1.2 s (+49.67% 🔺) 1.7 s
History retrieval protocols 27.64 KB (0%) 553 ms (0%) 1.8 s (+1.52% 🔺) 2.4 s
Deterministic Message Hashing 5.64 KB (0%) 113 ms (0%) 604 ms (+12.73% 🔺) 717 ms

@weboko weboko merged commit 27177a7 into master Aug 30, 2023
10 checks passed
@weboko weboko deleted the weboko/lightpush-send branch August 30, 2023 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants